package com.open.capacity.model.system;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import lombok.Data;

/**
 * @author 作者 ftquan E-mail: 464725602@qq.com
 * @version 创建时间：2017年11月12日 上午22:57:51
 * 用户实体
 */
@Data
@TableName("sys_user")
public class SysUser extends Model<SysUser> implements Serializable {

    private static final long serialVersionUID = -5886012896705137070L;
    @TableId(value = "id", type = IdType.ID_WORKER)  //雪花算法  id生成策略

    private String id;
    private String userName;
    private String password;
    private String realName;
    private String nickName;
    private String type;
    private String headUrl;
    private String code;
    private String tel;
    private String phone;
    // private String email;
    //  private String qq;
    //private String wechat;
    //private String openid;
    private String quickQuery;
    private String simpleSpelling;
    private Integer sex;
    //  private Date birthday;
    private String companyId;
    private String departmentId;
    private String question;
    //  private String answer;
    //  private Integer sort;
    private String description;
    private Integer status;
    @JsonFormat(timezone="GMT+8",pattern="yyyy-MM-dd HH:mm:ss.SSS")
    private Date createTime;
    @JsonFormat(timezone="GMT+8",pattern="yyyy-MM-dd HH:mm:ss.SSS")
    private Date updateTime;

    @TableField(exist = false)
    private List<SysRole> roles;

    @TableField(exist = false)
    private String roleIds;

    @TableField(exist = false)
    private String postIds;

    @TableField(exist = false)
    private String oldPassword;

    @TableField(exist = false)
    private String newPassword;

}
